// 不带任何参数的类 装饰器(直接打印内容，没有携带类以外参数的修饰效果)
function FirstClassDecorator(targetClass: any) {
  let targetClassObject = new targetClass();
  targetClassObject.buy();
  console.log('targetClass.name==', targetClass.name);
}
// @FirstClassDecorator 不用写成@FirstClassDecorator（name）进行传参
@FirstClassDecorator
class CustomerService {
  name: string = '李明2';
  constructor() {}
  buy() {
    console.log(this.name + '购买');
  }
  placeOrder() {
    console.log(this.name + '下单购买');
  }
}
